module.exports = (app) => {
    const { router, controller } = app;
    // 注册登录
    router.post('/register', controller.user.register);
    router.post('/login', controller.user.login);

    // 用户相关
    router.get('/users/student', controller.user.getStudentList);
    router.post('/users/student', controller.user.addStudent);
    router.delete('/users/student/:id', controller.user.deleteStudent);

    // 成绩相关
    router.get('/scores', controller.score.index);
    router.post('/scores', controller.score.create);
    router.put('/scores/:id', controller.score.update);
    router.delete('/scores/:id', controller.score.destroy);
};
